<%@ page contentType="text/html;charset=UTF-8" isErrorPage="true"%>
<%@ include file="/comm/include.jsp"%>
<script type="text/javascript">
$(function(){
	$('#data').datagrid({  
	    url:'${ctx}/order/list.htm',
	    pagination:true,
	    checkOnSelect:false,
	    singleSelect:true,
	    idField:'id',
	    nowrap:true,
	    rownumbers:true,
	    columns:[[
	        {field:'goodsId',title:'商品Id',width:100},
	        {field:'merchantId',title:'商家Id',width:100},
	        {field:'memberId',title:'会员Id',width:100},
	        {field:'orderStatus',title:'订单状态',width:80,
	        	formatter:function(value,row,index){
	        		if(value==1)
	        			return '<span style="color:green">已支付</span>';
	        		else 
	        			return '未支付';
	        	}	
	        },
	        {field:'rebateStatus',title:'返利状态',width:80,
	        	formatter:function(value,row,index){
	        		if(value==1)
	        			return '<span style="color:green">已返利</span>';
	        		else 
	        			return '未返利';
	        	}	
	        },
	        {field:'createTime',title:'购买时间',width:150}
	    ]]
	});
});
</script>
<div>
	<table id="data"></table>
</div>